<%@ page language="java" import="com.brother.model.*" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="international.jsp" %> 
<jsp:useBean id="emailSettingService" class="com.brother.service.EmailSettingService"></jsp:useBean>
<jsp:useBean id="emailSetting" class="com.brother.model.EmailSetting"></jsp:useBean>
<jsp:setProperty  property="*" name="emailSetting"/>
<%
Customer user = (Customer)session.getAttribute(com.brother.Constants.LOGIN_SESSTION_NAME);
if(user == null){
	return;
}
//EmailSetting set = emailSettingService.getEmailSetting(user.getUserid()+"");
String info = emailSettingService.sendMail(emailSetting,"test success!","test for email setting");
if(info.length() ==0){
%>
<fmt:message key="manage.email.test.correct"/>
<%}else{ %>
<fmt:message key="manage.email.test.failed"/><span style="color:red"><%=info%></span>
<%} %>

<%
com.brother.database.DataBase.closeThreadConnection();
%>